if(!jsx3.lang.Class.forName("ux.cdb.admin.contract.builder.step3.BankInfo")) {
    jsx3.lang.Class.defineClass("ux.cdb.admin.contract.builder.step3.BankInfo",
            ux.megatron.gui.WizardPanel,
            null,
            function (block) {
                /**
                 * instance initializer
                 * @param strName {String} unique name distinguishing this object from all other JSX GUI objects in the JSX application
                 * @param vntLeft {int|String} either a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
                 * @param vntTop {int|String} either a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
                 * @param vntWidth {int|String} either a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
                 * @param vntHeight {int|String} either a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
                 * @param strHTML {String} Text/HTML markup to place in the jsx3.gui.Block instance
                 */
                block.prototype.init = function(strName, vntLeft, vntTop, vntWidth, vntHeight, strHTML) {
                    //call constructor for super class (the super expects the name of the object and the function that it is an instance of)
                    this.jsxsuper(strName, vntLeft, vntTop, vntWidth, vntHeight, strHTML);
                };

                block.prototype.onAfterDeserialize = function() {
                    this.builder = this.getAncestorOfType("ux.cdb.admin.contract.builder.Builder");
                };

                block.prototype.onNext = function(objWIZARD, objBUTTON, objEVENT, strCURRENTPANEL) {
                    return this.doValidation() ? null : "NONE";
					//return null; // return "NONE" to not next panels
                };

                block.prototype.onPrev = function(objWIZARD, objBUTTON, objEVENT, strCURRENTPANEL) {
                    this.wizard.contactPerson = this.detail.getDataAsObject();
                    this.displayTip(true);
                    return null; // return "NONE" to not advance panels
                };

                block.prototype.onStepJump =  function(objWIZARD, objSTEP, objEVENT, strCURRENTPANEL){
                    return this.doValidation() ? null : 'NONE'; //return "NONE" to cancel the current jumpping..
                };

                block.prototype.onCancel = function(objWIZARD, objBUTTON, objEVENT, strCURRENTPANEL) {
                    this.builder.closeBuilder();
                    return null; // return "NONE" to not advance panels
                };

                block.prototype.onFinish = function(objWIZARD, objBUTTON, objEVENT, strCURRENTPANEL){
                    if(this.doValidation()) { this.builder.saveBuilder(); }
                    return "NONE";
                };

                block.prototype.onBeforeShow = function(objWIZARD, objBUTTON, objEVENT, strLASTPANEL) {
                    if(!this.getChild(0)) {
                        this.dialog = this.getAncestorOfType("ux.cdb.admin.contract.builder.Builder");
                        var me = this;
                        //alert(3);
                        ux.megatron.Main.loadUIResourceAsync(me, "ux.cdb.admin",
                            "ux/cdb/admin/contract/builder/step3/ui/bankInfoContent.xml", me, me.initialize);
                    }
                    return null; // return "NONE" to not advance panels
                };

                block.prototype.onAfterHide = function(objWIZARD, objBUTTON, objEVENT, strNEXTPANEL) {
                    return null; // return "NONE" to not advance panels
                };

                block.prototype.initialize = function(msg) {
                    this.loaded = true;
                    this.wizard = this.getAncestorOfType("ux.megatron.gui.SteppedWizard");
                    //console.log(this.wizard);
                    this.builder = this.getAncestorOfType("ux.cdb.admin.contract.builder.Builder");
                    var appInternalOrgId = this.wizard.newAppBasicInfo.appInternalOrgId;
                    this.get("blkAppInternalOrgId").get("txtValue").setValue(appInternalOrgId);
                    this.detail = this.get("blkStep3");
                    if(this.wizard.contactPerson) {
                        this.detail.setData(this.wizard.contactPerson);
                    }
					if(this.wizard.newAppBasicInfo.appInternalOrgName)
						this.get('fieldOfAppInternalOrgName').setDataByObject({appInternalOrgName:this.wizard.newAppBasicInfo.appInternalOrgName});
                };

                block.prototype.displayTip = function(passed, tip) {
                    if(!passed) {
                        tip = tip || ux.megatron.Main.getServer().getDynamicProperty("@cdb@contractBuilder@TipUnFinishedStep3");
                        this.wizard.getMessageLabel().setText(tip).repaint();
                    } else {
                        this.wizard.getMessageLabel().setText("");
                    }
                    return passed;
                };

                block.prototype.doValidation = function() {
                    var errorMsgs = this.detail.doValidate();
                    this.detail = this.get("blkStep3");
                    if(errorMsgs === null) {
                        this.wizard.contractPerson = this.detail.getDataAsObject();
                        return this.displayTip(true);
                    } else {
                        var tip = errorMsgs[0].label ? errorMsgs[0].label + ":" +errorMsgs[0].message : errorMsgs[0].message;
                        return this.displayTip(false, tip);
                    }
                };
            }
    );
}
